<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>浏览器滚动条</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="main.js"></script>
</head>
<style>
    body {
        padding: 0;
        margin: 0;
    }

    /* 设置滚动条的样式 */

    ::-webkit-scrollbar {
        width: 120px;
    }

    /* 滚动槽 */

    ::-webkit-scrollbar-track {
        -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
        border-radius: 10px;
    }

    /* 滚动条滑块 */
    ::-webkit-scrollbar-thumb {
        border-radius: 10px;
        background: rgba(100, 0, 255, 0.2);
        -webkit-box-shadow: inset006pxrgba(100, 0, 0, 0.5);
    }

    ::-webkit-scrollbar-thumb:window-inactive {
        background: rgba(255, 0, 0, 0.4);
    }

    .con {
        width: 100%;
        height: 2000px;
        background-color: rgba(255, 0, 100, 0.2);
    }
</style>

<body>
    <div class="con"></div>
</body>

</html>